﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Com.CMS263.BLL;
using Com.CMS263.Util;
using Com.CMS263.PO;

namespace Com.CMS263.Web.manage.ManageBaseArt
{
    public partial class action : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request["id"]);
            ArtBaseBLL bll = new ArtBaseBLL();
            ArtBase ab = bll.GetArtBaseById(id);
            AdminLoginInfo ali = AdminLoginCookie.GetLoginInfo();
            ArtTypeBLL atbll = new ArtTypeBLL();
            OperationLogBLL olbll = new OperationLogBLL();
            OperationLog ol = new OperationLog();
            ol.AddDate = DateTime.Now;
            ol.Ip = StringUtil.GetIP();
            ol.ModuleName = atbll.GetArtTypeById(ab.menuId).typeName;
            ol.Contents = "【删除】" + ab.title;
            ol.UserName = ali.UserName;
            olbll.Add(ol);

            bll.Delete(id);
            
            Response.Write("ok");
        }
    }
}
